package com.gmall.order;

import com.gmall.common.utils.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

@SpringBootApplication
@MapperScan("com.gmall.order.mapper")
@ComponentScan({"com.gmall"})
@EnableFeignClients(basePackages = {"com.gmall"})
@EnableAspectJAutoProxy
public class OrderApplication implements ApplicationRunner {
    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }

    @Bean
    public IdWorker idWorker(){
        return new IdWorker();
    }
    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("OrderApplication 启动成功1");
    }
}

